import requests

def send_msg(value,url):

    data = {
    "msgtype": "text",
    "text": {
        "content": value,
        }
    }
    return requests.post(url=url,json=data)


r = send_msg(value="这是机器人消息哦！",
             url="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=*****")

print(r.text)
